import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from "../components/Login";
import Index from "../components/Index";
import Fanyi from "../components/Fanyi";
import AddWord from "../components/AddWord";
import Statis from "../components/Statis";
import FindSimilar from "../components/FindSimilar";
import Review from "../components/Review";
import SysSetting from "../components/SysSetting";
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      redirect:'/login'
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/index',
      name: 'index',
      component:Index,
      children: [
        {
          path: '/index/fanyi',
          name: '翻译',
          component: Fanyi
        },
        {
          path: '/index/addword',
          name: '添加单词',
          component: AddWord
        },
        {
          path: '/index/statis',
          name: '统计',
          component: Statis
        },
        {
          path: '/index/similar',
          name: '查找相似',
          component: FindSimilar
        },
        {
          path: '/index/review',
          name: '背诵单词',
          component: Review
        },
        {
          path: '/index/sys',
          name: '背诵单词',
          component: SysSetting
        }
      ]
    }

  ]
})
